#include <stdio.h>
#include <string.h>
int main()
{
    char a[100] = "";
    int length =  strlen(a);
    gets(a);
    for (int i = 0; a[i] != '\0'; i++)
    {
        if (a[i]>='A'  && a[i] <= 'Z')
            a[i] = (a[i] + 23 - 'A') % 26 + 'a';
        else if (a[i]>='a' && a[i] <= 'z')
            a[i] = (a[i] + 23 - 'a') % 26 + 'A';
    }
    for (int i = 0; i < length / 2; i++)
    {
        char temp = a[i];
        a[i] = a[length - 1 - i];
        a[length - 1 - i] = temp;
    }
    puts(a);
    return 0;
}

